define(function (require, e, module) {

    var $ = require("zepto");
    require("fx");

    (function ($) {
        $.fn.coffee = function (e) {
            function n() {
                var e = r(8, h.steamMaxSize), n = o(1, h.steamsFontFamily), i = "#" + o(6, "0123456789ABCDEF"), a = r(0, 44), l = r(-90, 89), c = s(.4, 1), d = $.fx.cssPrefix + "transform";
                d = d + ":rotate(" + l + "deg) scale(" + c + ");";
                var g = $('<span class="coffee-steam">' + o(1, h.steams) + "</span>"), m = r(0, f - h.steamWidth - e);
                m > a && (m = r(0, a)), g.css({position: "absolute", left: a, top: h.steamHeight, "font-size:": e + "px", color: i, "font-family": n, display: "block", opacity: 1}).attr("style", g.attr("style") + d).appendTo(p).animate({top: r(h.steamHeight / 2, 0), left: m, opacity: 0}, r(h.steamFlyTime / 2, 1.2 * h.steamFlyTime), u, function () {
                    g.remove(), g = null;
                });
            }
            function a() {
                var t = r(-10, 10);
                t += parseInt(p.css("left")), t >= 54 ? t = 54 : 34 >= t && (t = 34), p.animate({left: t}, r(1e3, 3e3), u)
            }
            function o(t, e) {
                t = t || 1;
                var n = "", a = e.length - 1, o = 0;
                for (i = 0; t > i; i++)
                    o = r(0, a - 1), n += e.slice(o, o + 1);
                return n
            }
            function r(t, e) {
                var n = e - t, i = t + Math.round(Math.random() * n);
                return parseInt(i)
            }
            function s(t, e) {
                var n = e - t, i = t + Math.random() * n;
                return parseFloat(i)
            }
            var l = null, c = null, u = "cubic-bezier(.09,.64,.16,.94)", d = $(this), h = $.extend({}, $.fn.coffee.defaults, e), f = h.steamWidth, p = $('<div class="coffee-steam-box"></div>').css({height: h.steamHeight, width: h.steamWidth, left: 60, top: -50, position: "absolute", overflow: "hidden", "z-index": 0}).appendTo(d);
            return $.fn.coffee.stop = function () {
                clearInterval(l), clearInterval(c)
            }, $.fn.coffee.start = function () {
                l = setInterval(function () {
                    n()
                }, r(h.steamInterval / 2, 2 * h.steamInterval)), c = setInterval(function () {
                    a()
                }, r(100, 1e3) + r(1e3, 3e3))
            }, d
        };
        $.fn.coffee.defaults = {steams: ["jQuery", "HTML5", "HTML6", "CSS2", "CSS3", "JS", "$.fn()", "char", "short", "if", "float", "else", "type", "case", "function", "travel", "return", "array()", "empty()", "eval", "C++", "JAVA", "PHP", "JSP", ".NET", "while", "this", "$.find();", "float", "$.ajax()", "addClass", "width", "height", "Click", "each", "animate", "cookie", "bug", "Design", "Julying", "$(this)", "i++", "Chrome", "Firefox", "Firebug", "IE6", "Guitar", "Music", "攻城师", "旅行", "王子墨", "啤酒"], steamsFontFamily: ["Verdana", "Geneva", "Comic Sans MS", "MS Serif", "Lucida Sans Unicode", "Times New Roman", "Trebuchet MS", "Arial", "Courier New", "Georgia"], steamFlyTime: 5e3, steamInterval: 500, steamMaxSize: 30, steamHeight: 200, steamWidth: 300}, $.fn.coffee.version = "2.0.0"
    })($);

    module.exports = $;
});